package com.jobpass.common.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jobpass.common.insterface.FacultyMapper;
import com.jobpass.common.model.Faculty;
import com.jobpass.common.service.FacultyService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author JobPass
 * @since 2020-07-17
 */
@Service
public class FacultyServiceImpl extends ServiceImpl<FacultyMapper, Faculty> implements FacultyService {

    @Resource
    private FacultyMapper facultyMapper;
    @Override
    public List<Faculty> FindAllFaculty() {
        return facultyMapper.selectList(null);
    }

    @Override
    public Faculty FindFacultyById(Long id) {
        return facultyMapper.selectById(id);
    }

    @Override
    public int DeleteFacultyById(Long id) {
        return facultyMapper.deleteById(id);
    }

    @Override
    public int UpdateFacultyById(Faculty faculty) {
        return facultyMapper.updateById(faculty);
    }

    @Override
    public int SavaFaculty(Faculty faculty) {
        return facultyMapper.insert(faculty);
    }
}
